<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html
        PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
        "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:t="http://hotelmanager.com/tags">

<ui:composition template="./templates/main.xhtml">

    <head>
        <title>Welcome</title>
    </head>
    <body>

    <ui:define name="header">
        <ui:include src="./templates/header.xhtml"/>
    </ui:define>
    <ui:define name="content">
        <f:view locale="#{LocaleConf.langCd}">

            <h:form id="LoginForm" >

                <div align="right" >
                    <h:commandLink id="ua" immediate="true" action="#{LocaleConf.changeLocale}" >
                        <f:setPropertyActionListener target="#{LocaleConf.langCd}" value="uk"/>
                        <h:graphicImage id ="ukr" value="/ResourceFiles/icons/png/flags/24/Ukraine.png" style="border:0px"/>
                    </h:commandLink>
                    <h:commandLink id="en" immediate="true" action="#{LocaleConf.changeLocale}" >
                        <f:setPropertyActionListener target="#{LocaleConf.langCd}" value="en"/>
                        <h:graphicImage id ="eng" value="/ResourceFiles/icons/png/flags/24/UK.png" style="border:0px"/>
                    </h:commandLink>
                    <h:commandLink id="ru" immediate="true"  action="#{LocaleConf.changeLocale}">
                        <f:setPropertyActionListener target="#{LocaleConf.langCd}" value="ru"/>
                        <h:graphicImage id ="rus" value="/ResourceFiles/icons/png/flags/24/Russia.png" style="border:0px"/>
                    </h:commandLink>
                </div>
                <div class="auth_window" >

                <table class="std_table" align="center" >

                    <tr >
                        <td align="center" valign="middle" border="1" >
                            <table >
                             <tr>
                                 <td  align="right" ><h:outputText value ="#{t:localized('LOGIN')}:" styleClass="table_style" /></td>
                                 <td align="left"><h:inputText id="UserName" style="width:150px"  value ="#{User.userName}"/></td>
                                 <td rowspan="2" width="150px" align="right" >
                                     <h:graphicImage value="/ResourceFiles/img/lock.png" style="border:0px"/>
                                 </td>
                             </tr>
                              <tr>
                                 <td  align="right"><h:outputText value ="#{t:localized('PASSWORD')}:" styleClass="table_style"/></td>
                                 <td colspan="2" align="left"><h:inputSecret id="Password" style="width:150px"  value ="#{User.password}"/></td>
                             </tr>
                              <tr>

                                 <td colspan="2" align="right">
                                     <div class="Button"><h:commandLink value ="#{t:localized('BTN_GO')}" action="#{User.validateUser}"/> </div>
                                 </td>
                                 <td />
                             </tr>
                            </table>
                        </td>
                    </tr>
                </table>
                </div>
                <h:message id="errors1" for="UserName"/>
                <h:message id="errors2" for="Password"/>
            </h:form>
        </f:view>
    </ui:define>
    <ui:define name="footer">
        <ui:include src="./templates/footer.xhtml"/>
    </ui:define>
    </body>



</ui:composition>
</html>